/ Knockback
group(type=effect,ID=special_knockback,range=6,excludePlayer=true,power=1.8,pos=#pPos,delay=0.1;type=particle,ID=explode,size=(1.0,0.3,1.0),particleAmount=500,pos=#pExactPos)@luck=2

/ Nothing
type=nothing@luck=0@chance=2

/golem
type=VillagerGolem,amount=13@luck=2

/lightning
type=entity,ID=LightningBolt,amount=#rand(20,25),pos=#pPos@luck=-2

/leather set
group(ID=leather_helmet;ID=leather_chestplate;ID=leather_leggings;ID=leather_boots)@luck=0

/chain set
group(ID=chainmail_helmet;ID=chainmail_chestplate;ID=chainmail_leggings;ID=chainmail_boots)@luck=0

/iron set
group(ID=iron_helmet;ID=iron_chestplate;ID=iron_leggings;ID=iron_boots)@luck=1

/diamond set
group(ID=diamond_helmet;ID=diamond_chestplate;ID=diamond_leggings;ID=diamond_boots)@luck=2

/iron fall
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=iron_block);type=particle,ID=largesmoke,size=(1,2,1),particleAmount=500,delay=2;type=sound,ID=random.fizz,delay=2)@luck=0

/falling gold
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=gold_block);type=particle,ID=flame,size=(1,2,1),particleAmount=500,delay=2;type=sound,ID=item.fireCharge.use,delay=2)@luck=1

/falling diamond
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=diamond_block);type=entity,ID=LightningBolt,delay=2)@luck=1

/falling lapis
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=lapis_block);type=particle,ID=splash,size=(1,2,1),particleAmount=1000,delay=2;type=sound,ID=game.neutral.swim.splash,delay=2)@luck=0

/falling redstone
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=redstone_block);type=particle,ID=reddust,size=(1,2,1),particleAmount=500,delay=2;type=sound,ID=tile.piston.in,delay=2)@luck=0

/falling coal
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=coal_block);type=particle,ID=townaura,size=(1,2,1),particleAmount=700,delay=2;type=sound,ID=random.anvil_land,delay=2)@luck=0

/lucky potion
ID=potion,damage=8195,NBTTag=(CustomPotionEffects=#luckyPotionEffects,display=(Name="$6$lLucky Potion"))@luck=2

/unlucky potion
ID=potion,damage=16428,NBTTag=(CustomPotionEffects=#unluckyPotionEffects,display=(Name="$4$lUnlucky Potion"))@luck=1

/withru
type=entity,ID=WitherBoss,NBTTag=(Attributes=[(Name=generic.maxHealth,Base=2)],CustomName="You can kill me easily",CustomNameVisible=true)@luck=0

/bad wither
type=entity,ID=WitherBoss,NBTTag=(Attributes=[(Name=generic.maxHealth,Base=1000)],CustomName="You would struggle killing me",CustomNameVisible=true)@luck=-2

/creepersgonnacreep
type=entity,ID=Creeper,amount=#rand(20,22),posOffset=#circleOffset(4),NBTTag=(CustomName="$aCreepers Gonna Creep!",CustomNameVisible=true)@luck=-2

/elder guardians
group(type=difficulty,ID=hard;type=entity,ID=Guardian,amount=#rand(20,22),posOffset=#circleOffset(4),NBTTag=(Elder=1)))@luck=-2

/killer bunnies
type=entity,ID=Rabbit,amount=#rand(20,22),posOffset=#circleOffset(4),NBTTag=(RabbitType=99)@luck=-2

/wither skulls
type=entity,ID=WitherSkull,amount=#rand(20,22),posOffset=#circleOffset(4)@luck=-1

/fireballs
type=entity,ID=Fireball,amount=#rand(20,22),posOffset=#circleOffset(4),NBTTag=(CustomName="$4CannonBalls",CustomNameVisible=true)@luck=1

/arrows
group(type=entity,ID=Arrow,NBTTag=(Motion=#randLaunchMotion(0.6,15)),amount=60;type=entity,ID=Arrow,Motion=#randLaunchMotion(0.7,18)),amount=60)@luck=-1



 ------ Powerful Effects ------

/ Spiral Magic
type=entity,ID=lootplusplus.ThrownItem,pos=#pExactPos,posOffsetY=1.5,NBTTag=(ItemThrown=lootplusplus:spiral.spiral_magic,Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10), 1.0)),amount=15,delay=#rand(0.0,2.0)@luck=2

/ Temporary Wolves
type=entity,ID=Wolf,amount=#rand(1,5),NBTTag=(CollarColor=#rand(0,14),Owner=#pName,Silent=true,CustomName="#pName's Temporary Wolf",ActiveEffects=[(Id=20,Duration=100000,Amplifier=0,ShowParticles=false)])@luck=2@chance=10

/ Health + Regeneration
group(type=effect,ID=6,amplifier=#rand(2,6),duration=0;type=effect,ID=10,amplifier=#rand(1,2),duration=#rand(5,10);type=particle,ID=heart,size=(0.5,0.5,0.5),particleAmount=50,pos=#pExactPos)@luck=2

/ ------ Neutral Effects ------

/ Arrows
type=entity,ID=Arrow,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10),1.0)),amount=50,delay=#rand(0.0,4.0)@luck=2

/ Snowballs
type=entity,ID=Snowball,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10), 1.0)),amount=25,delay=#rand(0.0,2.0)@luck=2

/ Web
type=entity,ID=LuckyProjectile,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw,#pPitch,1.5),item=(id=web,Count=1),impact=["type=command,ID=\"fill ~ ~ ~ ~ ~1 ~ web 0 keep\""])@luck=2@chance=0.5

/ Flames
type=entity,ID=LuckyProjectile,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10),1.0),item=(id=blaze_powder,Count=1),impact=["type=effect,ID=special_fire,target=hitEntity,duration=5"],damage=0.0),amount=50,delay=#rand(0.0,2.0)@luck=2

/ Poison
group(type=effect,ID=19,target=hitEntity,amplifier=2,duration=5;type=particle,ID=splashpotion,damage=8196)@luck=2

/ Blindness + Slowness
group(type=effect,ID=15,target=hitEntity,duration=3;type=effect,ID=2,target=hitEntity,duration=3;type=particle,ID=largesmoke,size=(0.5,0.8,0.5),particleAmount=100,pos=#eExactPos,amount=10,delay=#rand(0.0,2.0))@chance=0.75@luck=2

/ Nausea
group(type=effect,ID=9,target=hitEntity,duration=20;type=particle,ID=splashpotion,damage=8196)@luck=2

/ Knockback
group(type=effect,ID=special_knockback,range=6,excludePlayer=true,power=1.8,pos=#pPos,delay=0.1;type=particle,ID=explode,size=(1.0,0.3,1.0),particleAmount=500,pos=#pExactPos)@luck=2

/ Upwards Knockback
group(type=effect,ID=special_knockback,target=hitEntity,directionPitch=-90,power=1.3,delay=0.1;type=particle,ID=explode,size=(0.5,0.5,0.5),particleAmount=500)@luck=2

/ Fire
group(type=effect,ID=special_fire,range=4,excludePlayer=true,duration=#rand(5,10);type=particle,ID=flame,pos=#pExactPos,size=(1.0,0.3,1.0),particleAmount=2000)@luck=2


/ ------ Destructive Effects ------

/ Lightning
type=entity,ID=LightningBolt@luck=-2

/ Explosion
type=explosion,damage=2@luck=-2

/ ------ Nothing ------
type=nothing@luck=-2@chance=200
type=nothing@luck=-1@chance=140
type=nothing@luck=0@chance=100
type=nothing@luck=1@chance=80
type=nothing@luck=2@chance=40


/ == PROJECTILES ==

/ Arrows
type=entity,ID=Arrow,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10),1.0)),amount=50,delay=#rand(0.0,4.0)@luck=2

/ Eggs
type=entity,ID=ThrownEgg,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10), 1.0)),amount=25,delay=#rand(0.0,2.0)@luck=2

/ TNT
type=entity,ID=PrimedTnt,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Fuse=40b,Motion=#motionFromDirection(#pYaw,#pPitch,0.8))@luck=2

/ Web
type=entity,ID=LuckyProjectile,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw,#pPitch,1.5),item=(id=web,Count=1),impact=["type=fill,ID=web,size=(2,2,2)"])@luck=2@chance=0.5

/ Flames
type=entity,ID=LuckyProjectile,pos=#pExactPos,posOffsetY=1.5,NBTTag=(Motion=#motionFromDirection(#pYaw+#rand(-10,10),#pPitch+#rand(-10,10),1.0),item=(id=blaze_powder,Count=1),impact=["type=effect,ID=special_fire,target=hitEntity,duration=5"],damage=0.0),amount=50,delay=#rand(0.0,2.0)@luck=2


/ == EFFECTS ==

/ Poison
group(type=effect,ID=19,target=hitEntity,amplifier=2,duration=5;type=particle,ID=splashpotion,damage=8196)@luck=2

/ Health + Regeneration
group(type=effect,ID=6,amplifier=#rand(2,6),duration=0;type=effect,ID=10,amplifier=#rand(1,2),duration=#rand(5,10);type=particle,ID=heart,size=(0.5,0.5,0.5),particleAmount=50,pos=#pExactPos)@luck=2

/ Blindness + Slowness
group(type=effect,ID=15,target=hitEntity,duration=3;type=effect,ID=2,target=hitEntity,duration=3;type=particle,ID=largesmoke,size=(0.5,0.8,0.5),particleAmount=100,pos=#eExactPos,amount=20,delay=#rand(0.0,3.0))@chance=0.75@luck=2

/ Knockback
group(type=effect,ID=special_knockback,range=6,excludePlayer=true,power=1.8,pos=#pPos,delay=0.1;type=particle,ID=explode,size=(1.0,0.3,1.0),particleAmount=500,pos=#pExactPos)@luck=2

/ Upwards Knockback
group(type=effect,ID=special_knockback,target=hitEntity,directionPitch=-90,power=1.3,delay=0.1;type=particle,ID=explode,size=(0.5,0.5,0.5),particleAmount=500)@luck=2

/ Fire
group(type=effect,ID=special_fire,range=4,excludePlayer=true,duration=#rand(5,10);type=particle,ID=flame,pos=#pExactPos,size=(1.0,0.3,1.0),particleAmount=2000)@luck=2

/ Lightening
type=entity,ID=LightningBolt@luck=2

/ == NOTHING ==
type=nothing@luck=0@chance=24
